package alingrad.engine.graphics;

import javax.microedition.khronos.opengles.GL10;

import alingrad.engine.util.GLColor;

public class RenderListNode {
	private Renderable mData;
	private float mX;
	private float mY;
	private float mRotation;
	private float mScaleX;
	private float mScaleY;
	private GLColor mColor;

	public RenderListNode() {
	}

	public RenderListNode(final Renderable data, final float x, final float y, final float rotation, final float scaleX, final float scaleY, final GLColor color) {
		set(data, x, y, rotation, scaleX, scaleY, color);
	}

	public void set(final Renderable data, final float x, final float y, final float rotation, final float scaleX, final float scaleY, final GLColor color) {
		mData = data;
		mX = x;
		mY = y;
		mRotation = rotation;
		mScaleX = scaleX;
		mScaleY = scaleY;
		mColor = color;
	}

	public void draw(GL10 gl) {
		mData.draw(gl, mX, mY, mRotation, mScaleX, mScaleY, mColor);
	}
}
